package sbc.group1.lab1.alt;

import java.io.IOException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

public class RmiServer {

	public RmiServer() {
		try {
			CarService cs = (CarService) 
			UnicastRemoteObject.exportObject(
					new CarServiceImplementation(),0);
			
			Registry registry = LocateRegistry.createRegistry(1099);
			
			registry.rebind("CarService", cs);
		} catch (Exception e) {
			System.out.println("Problem: " + e);
		}
	}

	public static void main(String args[]) throws IOException {
		new RmiServer();
		System.in.read();
	}

}
